/**
** Created by Kstar on 2022/1/12.
**/


#include "Creature.h"
#include <map>
extern Creature myMap[1000];

int idCount = 0;

Creature::Creature(int cx, int cy, int cTime) : point(cx, cy) {
    createTime = cTime;
    id = ++idCount;
}

Creature::Creature(int cx, int cy, int cTime,string ctag) : point(cx, cy) {
    createTime = cTime;
    tag = ctag;
    id = ++idCount;
}



Point Creature::getPoint() {
    return point;
}

void Creature::setPoint(int cx, int cy) {
    point.setX(cx);
    point.setY(cy);
}

int Creature::getCreateTime() {
    return createTime;
}

int Creature::getId() {
    return id;
}

int Creature::getAge() {
    return age;
}

void Creature::ageAdd(int step) {
    age += step;
}

void Creature::movePoint(int decX, int decY) {

    point.setX(point.getX()+decX);
    point.setY(point.getY()+decY);
}

string Creature::getTag() {
    return tag;
}

